package algorithm.bean;

/**
 * 河两岸状态
 * @author letere
 * @since  2020-12-30 10:00
 */
public class RiverStatus {
    /**
     * 左岸传教士数量
     */
    private int missionaryLeft;
    /**
     * 左岸野人数量
     */
    private int savageLeft;
    /**
     * 右岸传教士数量
     */
    private int missionaryRight;
    /**
     * 右岸野人数量
     */
    private int savageRight;
    /**
     * 船的位置，左1，右-1;
     */
    private int boat;

    public RiverStatus(){};

    public RiverStatus(int missionaryLeft, int savageLeft, int missionaryRight, int savageRight, int boat) {
        this.missionaryLeft = missionaryLeft;
        this.savageLeft = savageLeft;
        this.missionaryRight = missionaryRight;
        this.savageRight = savageRight;
        this.boat = boat;
    }

    public int getMissionaryLeft() {
        return missionaryLeft;
    }

    public void setMissionaryLeft(int missionaryLeft) {
        this.missionaryLeft = missionaryLeft;
    }

    public int getSavageLeft() {
        return savageLeft;
    }

    public void setSavageLeft(int savageLeft) {
        this.savageLeft = savageLeft;
    }

    public int getMissionaryRight() {
        return missionaryRight;
    }

    public void setMissionaryRight(int missionaryRight) {
        this.missionaryRight = missionaryRight;
    }

    public int getSavageRight() {
        return savageRight;
    }

    public void setSavageRight(int savageRight) {
        this.savageRight = savageRight;
    }

    public int getBoat() {
        return boat;
    }

    public void setBoat(int boat) {
        this.boat = boat;
    }

    @Override
    public String toString() {
        return String.format("[左：传%d, 野%d] | [右：传%d, 野%d]", missionaryLeft, savageLeft, missionaryRight, savageRight);
    }
}
